package com.eight.cloud.openfeign.admin.factory;

import com.eight.cloud.openfeign.admin.api.SystemClient;
import com.eight.cloud.openfeign.admin.vo.permission.PermissionTree;
import com.eight.cloud.core.global.result.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @ClassName: SystemFallbackFactory
 * @Author: TXC
 * @Date: 2025-02-14 16:34
 **/
@Component
@Slf4j
public class SystemFallbackFactory implements FallbackFactory<SystemClient> {
    @Override
    public SystemClient create(Throwable cause) {
        return new SystemClient() {
            @Override
            public Result<String> initSystem() {
                return null;
            }

            @Override
            public Result<String> flushPermission(PermissionTree permissionTrees) {
                return null;
            }
        };
    }
}
